<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!--临时查询form表单,可以增加一些分页的查询参数等,如果某一操作触发当前页面刷新,默认情况下提交此form进行查询-->
<form id="pagerForm" method="POST" action="/manage/services/switches/query">
    <input type="hidden" name="pageNum" value="1"/><!--【必须】value=1可以写死-->
    <input type="hidden" name="serviceName" value=""/>
    <input type="hidden" name="serviceURI" value=""/>
</form>

<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" method="POST" action="/manage/services/switches/query">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        服务名称：<input type="text" name="serviceName" value="${param.serviceName}" maxlength="50"/>
                    </td>
                    <td>
                        服务接口ＵＲＩ：<input type="text" name="serviceURI" value="${param.serviceURI}" maxlength="50"/>
                    </td>
                    <td><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></td>
                </tr>
            </table>
            <!--
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">查询</button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
            -->
        </div>
    </form>
</div>

<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li>
                <a class="add" href="/manage/services/switches/add" target="dialog" mask="true" rel="switch_add"
                   title="添加服务控制">
                    <span>添加服务控制</span>
                </a>
            </li>
            <li class="line">line</li>
            <li><a class="edit" href="/manage/services/switches/update/redis" target="ajaxTodo"
                   title="更新缓存"><span>更新缓存</span></a>
            </li>
            <!--
            <li><a class="delete" href="/manage/serviceSwitch/delete/{switch_id}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
            <li><a class="edit" href="/manage/serviceSwitch/update?id={switch_id}" target="dialog"  mask="true" rel="switch_edit"  title="修改服务控制"><span>修改</span></a></li>
            -->
        </ul>
    </div>
    <table class="table" width="100%" layoutH="88">
        <thead>
        <tr>
            <th width="30">序号</th>
            <th width="120">服务名称</th>
            <th width="240">服务接口ＵＲＩ</th>
            <th width="100">服务端返回code</th>
            <th>服务端返回msg</th>
            <th width="80" align="center">服务启动状态</th>
            <th width="80" align="center">操作</th>
        </tr>
        </thead>
        <tbody>

        <c:forEach items="${serviceSwitchs}" var="switchs" varStatus="status">
            <tr target="switch_id" rel="${switchs.id}">
                <td>${status.index+1}</td>
                <td>${switchs.serviceName}</td>
                <td>${switchs.serviceURI}</td>
                <td>${switchs.serviceResultCode}</td>
                <td>${switchs.serviceResultMsg}</td>
                <td>${switchs.serviceActivateStatus eq true ?"<font color='green'>启用</font>":"<font color='red'>关闭</font>"}</td>
                <td>
                    <a class="btnDel" href="/manage/services/switches/delete/${switchs.id}" target="ajaxTodo"
                       title="确定要删除吗?">删除</a>
                    <a class="btnEdit" href="/manage/services/switches/update?id=${switchs.id}" target="dialog"
                       mask="true"
                       rel="switch_edit" title="修改服务控制">修改</a>
                </td>
            </tr>
        </c:forEach>

        </tbody>
    </table>
    <!--
<div class="panelBar">
    <div class="pages">
        <span>显示</span>
        <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
            <option value="20">20</option>
            <option value="50">50</option>
            <option value="100">100</option>
            <option value="200">200</option>
        </select>
        <span>条，共${totalCount}条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="200" numPerPage="20" pageNumShown="10" currentPage="1"></div>
</div>
-->
</div>
